package com.emin.platform.subjectcenter.entity;

import com.emin.base.domain.BaseEntity;
import com.emin.base.domain.UndeleteableEntity;

import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;

/**
 * Entity 的基类
 */
@EntityListeners(EntityListener.class)
@MappedSuperclass
public abstract class BaseicEntity extends BaseEntity implements UndeleteableEntity {

    private static final long serialVersionUID = -3720962564538104055L;

    /**
     * 实体的状态
     **/
    private int status;

    /**
     * 创建的时间
     **/
    private Long createTime;

    /**
     * 修改时间
     **/
    private Long lastModifyTime;

    @Override
    @Column(length = 1, columnDefinition = "Int default 0")
    public int getStatus() {
        return status;
    }

    @Override
    public void setStatus(int status) {
        this.status = status;
    }

    @Override
    @Column(nullable = false)
    public Long getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    @Override
    @Column(nullable = false)
    public Long getLastModifyTime() {
        return lastModifyTime;
    }

    @Override
    public void setLastModifyTime(Long lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }
}
